import time

start = time.time()
class Dog():
    """一次简单模拟小狗的尝试"""

    def __init__(self, name, age):
        """初始化name，age"""
        self.name = name
        self.age = age

    def sit(self):
        """模拟小狗蹲下"""
        print(self.name.title() + " is now sitting.")

    def roll(self):
        """模拟小狗打滚"""
        print(self.name.title() + "rolled over!")


my_dog = Dog('doom', 12)
my_dog.sit()
end = time.time()
print(f"共用时{end - start}s")